﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年8月24日
//类描述：实体类 SetMsg_Sent (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年8月24日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.PreAlarm.Model
{
    /// <summary>
    /// 实体类 SetMsg_Sent (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "SetMsg_Sent", PrimaryKey = "SetMsg_No", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class SetMsg_SentInfo : BaseModel
    {
        public SetMsg_SentInfo()
        {            
            PrimaryKey = "SetMsg_No"; 
			Fields.Add("SetMsg_No");//SetMsg_No
			Fields.Add("SetMsg_Content");//SetMsg_Content
			
			
			CanNotNullFields.Add("SetMsg_No");//SetMsg_No不能为空!				
			
			CanNotNullFields.Add("SetMsg_Content");//SetMsg_Content不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public SetMsg_SentInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
			
        }
        #endregion 
		
		#region 成员变量
				
		private string _SetMsg_No;//SetMsg_No
		private string _SetMsg_Content;//SetMsg_Content
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// SetMsg_No
        /// </summary>       
		[ModelField(Description = "SetMsg_No", Type = typeof(string), ErrorMessage = "SetMsg_No信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = true, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string SetMsg_No
        {
            get
            {
                return this._SetMsg_No;
            }
            set
            {
                if (_SetMsg_No != value || (_SetMsg_No == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("SetMsg_Sent", "SetMsg_No", _SetMsg_No, value, "varchar", "SetMsg_No");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnSetMsg_NoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._SetMsg_No = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnSetMsg_NoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _SetMsg_No = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// SetMsg_Content
        /// </summary>       
        [ModelField(Description = "SetMsg_Content", Type = typeof(string), ErrorMessage = "SetMsg_Content信息错误!", FieldType = FieldType.Normal, IsKeyField = false, IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 8000, DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string SetMsg_Content
        {
            get
            {
                return this._SetMsg_Content;
            }
            set
            {
                if (_SetMsg_Content != value || (_SetMsg_Content == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("SetMsg_Sent", "SetMsg_Content", _SetMsg_Content, value, "varchar", "SetMsg_Content");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnSetMsg_ContentChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._SetMsg_Content = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnSetMsg_ContentChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _SetMsg_Content = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnSetMsg_NoChanging(ModifyInfo modifyInfo);//SetMsg_NoSetMsg_No改变之前发生
        partial void OnSetMsg_NoChanged(ModifyInfo modifyInfo);//SetMsg_NoSetMsg_No改变之后发生
		partial void OnSetMsg_ContentChanging(ModifyInfo modifyInfo);//SetMsg_ContentSetMsg_Content改变之前发生
        partial void OnSetMsg_ContentChanged(ModifyInfo modifyInfo);//SetMsg_ContentSetMsg_Content改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("SetMsg_Sent", "SetMsg_No", SetMsg_No);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("SetMsg_Sent", "SetMsg_No", SetMsg_No);		
			ManageEditURI = ZModel.InitMEditURI("SetMsg_Sent", "SetMsg_No", SetMsg_No);	
		 	ManageDetailURI = ZModel.InitMDetailURI("SetMsg_Sent", "SetMsg_No", SetMsg_No);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}